home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / fgl105c.zip / 12-09.C < prev    next >
Text File  |  1991-05-06  |  1KB  |  47 lines

  1. int solid[]  = {0xE03F,0xE03F,0xE03F,0x0007,0x0007,0x0007,0x0007,0x0007,
  2.                 0x0007,0x0007,0xE03F,0xE03F,0xE03F,0xFFFF,0xFFFF,0xFFFF,
  3.                 0x0000,0x0F80,0x0F80,0x0F80,0x7FF0,0x7FF0,0x7FF0,0x7FF0,
  4.                 0x7FF0,0x0F80,0x0F80,0x0F80,0x0000,0x0000,0x0000,0x0000};
  5.  
  6. int hollow[] = {0xE03F,0xEFBF,0xEFBF,0x0F87,0x7FF7,0x7FF7,0x7FF7,0x7FF7,
  7.                 0x7FF7,0x0F87,0xEFBF,0xEFBF,0xE03F,0xFFFF,0xFFFF,0xFFFF,
  8.                 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0200,0x0000,
  9.                 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000};
  10.  
  11. main()
  12. {
  13.    int old_mode;
  14.    int column, row, last_row;
  15.  
  16.    old_mode = fg_getmode();
  17.    fg_setmode(fg_automode());
  18.  
  19.    if (fg_mouseini() < 0) {
  20.       fg_setmode(old_mode);
  21.       fg_reset();
  22.       exit();
  23.       }
  24.  
  25.    fg_setcolor(15);
  26.    fg_rect(0,fg_getmaxx(),0,fg_getmaxy());
  27.  
  28.    fg_setcolor(12);
  29.    column = fg_xalpha(fg_getmaxx()/2) - 6;
  30.    last_row = fg_yalpha(fg_getmaxy()) + 1;
  31.  
  32.    for (row = 0; row < last_row; row++) {
  33.       fg_locate(row,column);
  34.       fg_text("example 12-9",12);
  35.       }
  36.  
  37.    fg_mousevis(1);
  38.    fg_waitkey();
  39.    fg_mouseptr(solid,6,6);
  40.    fg_waitkey();
  41.    fg_mouseptr(hollow,6,6);
  42.    fg_waitkey();
  43.  
  44.    fg_setmode(old_mode);
  45.    fg_reset();
  46. }
  47.